import Vue from 'vue'
import VueRouter from 'vue-router'
import { menuList } from "./router.js"

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name:"layout",
    component:()=>import("../layout/main/main.vue"),
    redirect:"/news/managerNews",
    children:menuList
  },
  {
    path: '/login',
    name:"login",
    component:()=>import("../views/login.vue"),
  },

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
